home *** CD-ROM | disk | FTP | other *** search
- Path: druid.borland.com!usenet
- From: pete@borland.com (Pete Becker)
- Newsgroups: comp.object,comp.lang.c++,comp.lang.java
- Subject: Re: Java: What's the Big Deal?
- Date: 16 Mar 1996 20:50:52 GMT
- Organization: Borland International
- Message-ID: <4if9jc$rkm@druid.borland.com>
- References: <4i40ik$9dt@news4.digex.net> <milodDo5yDE.H8B@netcom.com>
- NNTP-Posting-Host: pbecker.borland.com
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=ISO-8859-1
- X-Newsreader: WinVN 0.99.5
-
- In article <milodDo5yDE.H8B@netcom.com>, milod@netcom.com says...
- >
- >ell@access1.digex.net (Ell) writes:
- >
- >>What is you can do in Java, you can't do as easily with a library in C++?
- >
- >Write applets the run on the Web (duh! :-) Folklore has it
- >that Sun couldn't even interest anyone in Oak until the
- >applet idea came around. Suddenly, everybody wants some.
- >
-
- There's no reason you can't write a C++ compiler that generates a Java
- bytestream.
-
- >Seriously: The 2nd most notable thing about Java may be the
- >JVM. Developers can write programs that are binary compatible
- >on a variety of platforms and operating systems (remember JF?).
- >
-
- Once again, there's no reason you can't write a C++ compiler that targets the
- Java virtual machine.
-
- >Actually, the Smalltalk uh...afficianados have been saying
- >"we had a virtual machine first!", but the interesting
- >difference is that the JVM is standard across Java compilers
- >(and some other language compilers) which provides the
- >portability. Something Smalltalk has never really had.
- >
- >Other merely practical advantages (for certain kinds of apps)
- >include:
- >
- >1) Trade speed for safety (no pointer arithmetic + GC +
- > all casts dynamically checked + array bounds + ...)
- > This makes it a bit easier to program in than C++.
- >
-
- Huh? Why can't you make these tradeoffs in C++? In fact, the problem is just
- the opposite: you can't make these tradeoffs in Java because it does not let
- you use pointers or handle your own memory management. This means you cannot
- decide that speed is more important than safety.
-
- >2) No header files => faster compilation
- >
-
- Nonsense. Header files are simply text that gets included where you want it. If
- you write the same code without header files it will not magically compile
- faster.
-
- >3) Slightly simpler syntax (mostly due to the lack of
- > address operators, function pointers, and templates)
- >
-
- Yup. The question, of course, is what this does to the expressive power of the
- language.
-
- >4) Standard library comes with the language - which is
- > still not quite true of C++.
-
-